﻿using System;

class CalculateSumOfSequence
{
    static void Main()
    {
        float sum=1;
        float sign = 1;
        for (int i = 2; i <= 1000; i++)
        {
            sum += sign / i;
            sign *= -1;
        }
        Console.WriteLine(sum);
        Console.WriteLine(Math.Round(sum,3));
    }
}